﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace YiNing.Tools.Args
{
    public class ProductMappingArgs
    {
        public enum FilterTypeEnum
        {
            过滤,
            保留,
        }
        public enum NotchLocation
        {
            上,
            下,
            左,
            右
        }
        [Category("基本参数")]
        [Description("缺口位置")]
        [DisplayName("缺口位置")]
        public NotchLocation WaferNotchLocation { get; set; }
        /// <summary>
        /// 非芯片字符
        /// </summary>
        [Description("非芯片字符")]
        [DisplayName("非芯片字符")]
        [Category("基本参数")]
        public string NotDieChar { get; set; }
        /// <summary>
        /// 非芯片字符
        /// </summary>
        [Description("过滤芯片字符")]
        [DisplayName("过滤芯片字符")]
        [Category("基本参数")]
        public string FilterDieChar { get; set; }
        [Description("过滤芯片字符在单个芯片字符串中的起始位置")]
        [DisplayName("过滤芯片字符在单个芯片字符串中的起始位置")]
        [Category("基本参数")]
        public int FilterDieCharStartIndex { get; set; }
        [Description("过滤芯片在单个芯片字符串中的长度")]
        [DisplayName("过滤芯片在单个芯片字符串中的长度")]
        [Category("基本参数")]
        public int FilterDieCharLength { get; set; }
        [Description("通过过滤芯片字符来过滤的方式")]
        [DisplayName("过滤机制")]
        [Category("基本参数")]
        public FilterTypeEnum FilterType { get; set; }
        /// <summary>
        /// 非芯片字符
        /// </summary>
        [Description("一般默认是空，如果有些特殊的结构每个芯片中间有比如“,”这些分隔符那就填写")]
        [DisplayName("芯片间分隔符")]
        [Category("基本参数")]
        public char DieSpiltChar { get; set; }
        [Description("一般默认是1")]
        [DisplayName("芯片字符长度")]
        [Category("基本参数")]
        public int DieCharLenght { get; set; }

        [Category("对位偏移")]
        [Description("请设置为和程式图谱一样的参数，表示最左边的芯片往右偏移多少个位置")]
        [DisplayName("横坐标偏移个数")]
        public int OffsetXNum { get; set; }
        [Category("对位偏移")]
        [Description("请设置为和程式图谱一样的参数，表示最上边的芯片往下偏移多少个位置")]
        [DisplayName("纵坐标偏移个数")]
        public int OffsetYNum { get; set; }

        public static ProductMappingArgs Default()
        {

            return new ProductMappingArgs()
            {
                FilterType = FilterTypeEnum.保留,
                WaferNotchLocation = NotchLocation.下,
                DieCharLenght = 1,
                FilterDieCharStartIndex = 0,
                FilterDieCharLength = 1,
                //DieSpiltChar = '',
                NotDieChar = " ",
                FilterDieChar = "1",
                OffsetXNum = 2,
                OffsetYNum = 2,
            };
        }
    }
}
